package com.shujia.wyh.day07.ketang;

/*
    局部内部类


 */

class Outer2{
    int a = 11;

    public void fun1(){
        int a = 22;  //如果局部变量存在的方法中有局部内部类，默认会在局部变量之前加上一个final关键jdk1.8之后出现的特性
        class Inner2{
//            int a = 33;
            public void show(){
//                a = 100;
                System.out.println(a);
            }

        }

        Inner2 inner2 = new Inner2();
        inner2.show();
    }
}

public class Student8 {
    public static void main(String[] args) {
        Outer2 outer2 = new Outer2();
        outer2.fun1();
    }
}
